<template>
	<view>
		<!-- <view class="item" v-if="grade == 1">
			<text style="text-shadow: 0px 1rpx 2rpx #3B4359;">平台VIP</text>
			<image src="./1.png"></image>
		</view> -->
		<view class="item grade2" v-if="grade == 2">
			<text>水站代理</text>
			<image src="./2.png"></image>
		</view>
		<view class="item grade3" v-if="grade == 3">
			<text>区县代理</text>
			<image src="./3.png"></image>
		</view>
		<view class="item grade4" v-if="grade == 4">
			<text>市级代理</text>
			<image src="./4.png"></image>
		</view>
		<view class="item grade5" v-if="grade == 5">
			<text>省级代理</text>
			<image src="./5.png"></image>
		</view>
		<view class="item grade6" v-if="data.isCardPromoter" style="width: 140rpx;">
			<text>开卡员</text>
			<image src="./6.png" style="height: 48rpx;"></image>
		</view>
		<view class="item grade7" v-if="data.isTeTong">
			<text>特通渠道</text>
			<image src="./7.png"></image>
		</view>
	</view>
</template>

<script>
	import {
		mapGetters
	} from "vuex";
	export default {
		props: {
			grade: {
				type: [String, Number, null],
				default: '1',
			},
			data: {
				type: Object,
				default: function() {
					return {}
				},
			},
		},
		computed: mapGetters(['userInfo']),
		components: {
		},
		data() {
			return {
				
			};
		},
		watch:{
			
		},
		onLoad() {
			console.log(this.data)
		},
		/**
		 * 页面上拉触底事件的处理函数
		 */
		onReachBottom: function () {
		},
		methods: {
			
		}
	}
</script>

<style scoped lang="scss">
	.item{
		width: 160rpx;
		height: 40rpx;
		background: linear-gradient( 180deg, #99A0B2 0%, #616D82 100%);
		border-radius: 0px 19rpx 19rpx 0px;
		position: relative;
		margin-left: 27rpx;
		display: flex;
		align-items: center;
		text{
			padding-left: 30rpx;
			color: #FFFFFF;
			
		}
		image{
			flex-shrink: 0;
			width: 54rpx;
			height: 60rpx;
			display: block;
			position: absolute;
			left: 0%;
			top: 50%;
			transform: translate(-50%,-50%);
		}
	}
	.grade2{
		background: #FFEFEF;
		text{
			color: #FF2828;
		}
	}
	.grade3{
		background: #EFF6FF;
		text{
			color: #1C59B6;
		}
	}
	.grade4{
		background: #FFFBEF;
		text{
			color: #B2692E;
		}
	}
	.grade5{
		background: #FFFCEB;
		text{
			color: #FF9C00;
		}
	}
	.grade6{
		background: linear-gradient( 180deg, #DAEBED 0%, #82DBE8 100%);
		text{
			color: #32A4B1;
		}
	}
	.grade7{
		background: linear-gradient( 180deg, #FFD4F3 0%, #FF8AE2 100%);
		text{
			color: #FFFFFF;
		}
	}
</style>
